


import '../main.dart';
import 'convert_util.dart';

String? analysisReaderRule(String block){
  String rule = settingEntity.analysisReader??'xy';
  String? result = '';
  if(rule == 'xy'){
    result = xyRule(block);
  }
  if(rule == 'cz'){
    result = czRule(block);
  }
  return result;
}

String? xyRule(String uid){
  String exUid = flip(uid);
  String uidNo = hexToInt(exUid).toString();
  while(uidNo.length<10){
    uidNo = '0$uidNo';
  }
  return uidNo;
}

String? czRule(String uid){
  return flip(uid);
}